//package com.alon.spring01.common.config.fast;
//
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.fasterxml.jackson.databind.module.SimpleModule;
//import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.converter.HttpMessageConverter;
//import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
//
//import java.text.SimpleDateFormat;
//import java.util.List;
//
///**
// * @program: spring01
// * @description: 返回空串配置
// * @author: yulongguang
// * @create: 2019-08-22 11:16
// **/
//@Configuration
//public class FastJsonEmptyConfig extends WebMvcConfigurationSupport {
//    private static final String DATE_PARRET = "yyyy-MM-dd HH:mm:dd";
//
//    @Override
//    protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
//        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
//        ObjectMapper objectMapper = new ObjectMapper();
//        SimpleModule module = new SimpleModule();
//        module.addSerializer(new ToStringSerializer(Long.TYPE));
//        module.addSerializer(new ToStringSerializer(Long.class));
//
//        objectMapper.setDateFormat(new SimpleDateFormat(DATE_PARRET));
//        objectMapper.registerModule(module);
//        converter.setObjectMapper(objectMapper);
//        converters.add(converter);
//    }
//}
